SettingPanel = {};
local this = SettingPanel;

local gameObject;
local transform;
local behaviour;

function SettingPanel.New()
	panelMgr:CreatePanel("Setting", nil);
end

function SettingPanel.Awake(go)
	log("SettingPanel.Awake");
	gameObject = go;
	transform = go.transform;
	behaviour = go:GetComponent('LuaBehaviour');
	
	this.closeBtn = transform:Find("CloseBtn").gameObject;
	behaviour:AddClick(this.closeBtn, this.OnCloseClick);
	
	Time.timeScale = 0;
end

function SettingPanel.OnCloseClick()
	panelMgr:ClosePanel("Setting");
	Time.timeScale = 1;
end

function SettingPanel.OnDestroy()
end 